/* 全局样式 */
* {
  box-sizing: border-box;
}

.user-page {
  display: flex;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", sans-serif;
  background: linear-gradient(135deg, #ff6699 0%, #e84393 100%);
}

/* 侧边栏样式 */
.sidebar {
  width: 280px;
  background: linear-gradient(180deg, #2c3e50 0%, #34495e 100%);
  color: white;
  padding: 0;
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
  position: relative;
  overflow: hidden;
}

.sidebar::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, rgba(255, 255, 255, 0.1) 0%, transparent 100%);
  pointer-events: none;
}

.sidebar-header {
  padding: 30px 20px;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.1);
}

.user-avatar {
  width: 80px;
  height: 80px;
  margin: 0 auto 15px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.username {
  margin: 0 0 8px 0;
  font-size: 20px;
  font-weight: 600;
  color: #fff;
}

.user-level {
  font-size: 12px;
  color: #ff6699;
  background: rgba(255, 102, 153, 0.2);
  padding: 4px 12px;
  border-radius: 12px;
  display: inline-block;
}

.sidebar-nav {
  padding: 20px 0;
}

.sidebar-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-nav li {
  margin: 0;
  position: relative;
  overflow: hidden;
}

.sidebar-nav li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: #ff6699;
  transform: scaleY(0);
  transition: transform 0.3s ease;
}

.sidebar-nav li.active::before {
  transform: scaleY(1);
}

.sidebar-nav li {
  padding: 16px 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  font-weight: 500;
}

.sidebar-nav li:hover,
.sidebar-nav li.active {
  background: linear-gradient(90deg, rgba(255, 102, 153, 0.2) 0%, transparent 100%);
  color: #ff6699;
  transform: translateX(5px);
}

.nav-icon {
  font-size: 18px;
  width: 20px;
  text-align: center;
}

/* 主内容区域 */
.user-page .main-content {
  flex: 1;
  padding: 0;
  background: #f8f9fa;
  overflow-y: auto;
  margin-left: 0;
}

.content-wrapper {
  max-width: 1000px;
  margin: 0 auto;
  padding: 30px;
}

/* 内容卡片 */
.content-card {
  background: white;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.content-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.card-header {
  padding: 25px 30px;
  background: linear-gradient(135deg, #ff6699 0%, #e84393 100%);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-header h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-body {
  padding: 30px;
}

/* 用户信息网格 */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.info-item {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 12px;
  border-left: 4px solid #ff6699;
  transition: all 0.3s ease;
}

.info-item:hover {
  background: #e9ecef;
  transform: translateY(-2px);
}

.info-label {
  font-size: 14px;
  color: #6c757d;
  margin-bottom: 8px;
  font-weight: 500;
}

.info-value {
  font-size: 18px;
  font-weight: 600;
  color: #2c3e50;
}

.info-value.highlight {
  color: #28a745;
}

.info-value.coin {
  color: #ffc107;
}

.avatar-section {
  margin-top: 30px;
  padding-top: 30px;
  border-top: 1px solid #e9ecef;
}

.avatar-section h3 {
  margin-bottom: 20px;
  color: #2c3e50;
}

/* 表单样式 */
.password-form {
  max-width: 500px;
}

.form-group {
  margin-bottom: 25px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #2c3e50;
  font-size: 14px;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  font-size: 16px;
  transition: all 0.3s ease;
  background: white;
}

.form-input:focus {
  outline: none;
  border-color: #ff6699;
  box-shadow: 0 0 0 3px rgba(255, 102, 153, 0.1);
}

.form-input.error {
  border-color: #dc3545;
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.error-message {
  color: #dc3545;
  font-size: 14px;
  margin-top: 5px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.error-message::before {
  content: "⚠️";
  font-size: 12px;
}

.success-message {
  background: #d4edda;
  color: #155724;
  padding: 15px;
  border-radius: 8px;
  margin-top: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #c3e6cb;
}

.success-icon {
  font-size: 18px;
}

/* 按钮样式 */
.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, #ff6699 0%, #ff4757 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(255, 102, 153, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 102, 153, 0.4);
}

.btn-outline {
  background: transparent;
  color: #6c757d;
  border: 2px solid #e9ecef;
}

.btn-outline:hover {
  background: #f8f9fa;
  border-color: #ff6699;
  color: #ff6699;
}

/* 举报按钮样式 */
.btn-report {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
  color: white;
  border: none;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

.btn-report:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4);
}

.btn.loading {
  pointer-events: none;
  opacity: 0.7;
}

.btn-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.btn-icon {
  font-size: 16px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* 等级样式 */
.level-info {
  max-width: 600px;
}

.current-level {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 30px;
}

.level-badge {
  background: linear-gradient(135deg, #ff6699 0%, #ff4757 100%);
  color: white;
  padding: 15px 25px;
  border-radius: 25px;
  font-size: 18px;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(255, 102, 153, 0.3);
}

.level-details {
  flex: 1;
}

.exp-text {
  font-size: 16px;
  color: #6c757d;
  margin: 0;
}

.exp-current {
  color: #28a745;
  font-weight: 600;
}

.exp-max {
  color: #6c757d;
  font-weight: 600;
}

.progress-container {
  margin-bottom: 20px;
  position: relative;
}

.progress-bar {
  width: 100%;
  height: 12px;
  background: #e9ecef;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #ff6699 0%, #ff4757 100%);
  border-radius: 6px;
  transition: width 0.8s ease;
  position: relative;
  overflow: hidden;
}

.progress-shine {
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: shine 2s infinite;
}

@keyframes shine {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

.progress-text {
  position: absolute;
  right: 0;
  top: -25px;
  font-size: 14px;
  color: #6c757d;
  font-weight: 600;
}

.next-level {
  text-align: center;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
}

.next-level-text {
  color: #6c757d;
  font-size: 16px;
}

/* 列表样式 */
.list-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.list-item {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 12px;
  border-left: 4px solid #ff6699;
  transition: all 0.3s ease;
}

.list-item:hover {
  background: #e9ecef;
  transform: translateX(5px);
}

.item-category {
  display: inline-block;
  background: #ff6699;
  color: white;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 10px;
}

.item-title {
  font-size: 16px;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 5px;
}

.item-meta {
  font-size: 14px;
  color: #6c757d;
}

/* 表格样式 */
.table-container {
  overflow-x: auto;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
}

.data-table th {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 15px;
  text-align: left;
  font-weight: 600;
  font-size: 14px;
}

.data-table td {
  padding: 15px;
  border-bottom: 1px solid #e9ecef;
  font-size: 14px;
}

.data-table tr:hover {
  background: #f8f9fa;
}

.data-table tr.expired {
  background: #fff5f5;
  color: #dc3545;
}

.code-text {
  background: #f8f9fa;
  padding: 4px 8px;
  border-radius: 4px;
  font-family: "Monaco", "Menlo", monospace;
  font-size: 12px;
  color: #e83e8c;
}

.status-badge {
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.status-badge.active {
  background: #d4edda;
  color: #155724;
}

.status-badge.expired {
  background: #f8d7da;
  color: #721c24;
}

/* 模态框样式 */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  backdrop-filter: blur(5px);
}

.modal-content {
  background: white;
  border-radius: 16px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-50px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-header {
  padding: 20px 25px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.modal-close {
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.3s ease;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.modal-body {
  padding: 25px;
}

.radio-group {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.radio-item {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 12px;
  border-radius: 8px;
  transition: background 0.3s ease;
}

.radio-item:hover {
  background: #f8f9fa;
}

.radio-item input[type="radio"] {
  margin: 0;
  accent-color: #ff6699;
}

.radio-label {
  font-size: 16px;
  color: #2c3e50;
}

.modal-footer {
  padding: 20px 25px;
  background: #f8f9fa;
  display: flex;
  justify-content: flex-end;
  gap: 15px;
}

/* 举报弹窗样式 */
.report-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  backdrop-filter: blur(5px);
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.report-modal-content {
  background: white;
  border-radius: 16px;
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-50px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.report-modal-header {
  padding: 20px 25px;
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 16px 16px 0 0;
}

.report-modal-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

.report-icon {
  font-size: 20px;
}

.report-modal-close {
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.3s ease;
}

.report-modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.report-modal-body {
  padding: 25px;
}

.report-section-title {
  margin: 0 0 15px 0;
  font-size: 16px;
  font-weight: 600;
  color: #2c3e50;
}

/* 举报对象信息 */
.report-target-info {
  margin-bottom: 25px;
}

.report-target-card {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 12px;
  padding: 15px;
  border-left: 4px solid #dc3545;
}

.report-target-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.report-target-author {
  font-size: 14px;
  font-weight: 600;
  color: #2c3e50;
}

.report-target-type {
  background: #dc3545;
  color: white;
  padding: 2px 8px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
}

.report-target-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.report-target-title {
  font-size: 16px;
  font-weight: 600;
  color: #2c3e50;
  line-height: 1.4;
}

.report-target-preview {
  font-size: 14px;
  color: #6c757d;
  line-height: 1.5;
  background: white;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

/* 举报原因输入 */
.report-reason-section {
  margin-bottom: 25px;
}

.report-reason-input-container {
  margin-bottom: 15px;
}

.report-reason-input {
  width: 100%;
  padding: 15px;
  border: 2px solid #e9ecef;
  border-radius: 12px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  transition: all 0.3s ease;
  background: white;
  line-height: 1.5;
}

.report-reason-input:focus {
  outline: none;
  border-color: #dc3545;
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
  transform: translateY(-1px);
}

.report-reason-char-count {
  text-align: right;
  font-size: 12px;
  color: #6c757d;
  margin-top: 8px;
}

.char-count-warning {
  color: #dc3545;
  font-weight: 500;
}

/* 常用举报原因提示 */
.report-reason-tips {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

.tips-title {
  font-size: 14px;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 10px;
  display: block;
}

.tips-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tip-tag {
  background: white;
  border: 1px solid #dc3545;
  color: #dc3545;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
}

.tip-tag:hover {
  background: #dc3545;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

/* 弹窗底部按钮 */
.report-modal-footer {
  padding: 20px 25px;
  background: #f8f9fa;
  border-radius: 0 0 16px 16px;
  display: flex;
  justify-content: flex-end;
  gap: 15px;
  border-top: 1px solid #e9ecef;
}

.report-cancel-btn {
  padding: 10px 20px;
  border: 2px solid #6c757d;
  background: white;
  color: #6c757d;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.report-cancel-btn:hover {
  background: #6c757d;
  color: white;
}

.report-submit-btn {
  padding: 10px 20px;
  border: none;
  background: linear-gradient(135deg, #dc3545, #c82333);
  color: white;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.report-submit-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4);
}

.report-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.report-submit-btn.loading {
  pointer-events: none;
}

.report-submit-icon {
  font-size: 14px;
}

/* 空状态样式 */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #6c757d;
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 20px;
  opacity: 0.5;
}

.empty-state p {
  font-size: 18px;
  margin-bottom: 20px;
}

/* 加载和错误状态 */
.loading-container,
.error-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: #f8f9fa;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #e9ecef;
  border-top: 4px solid #ff6699;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

.error-container {
  color: #dc3545;
}

.error-icon {
  font-size: 48px;
  margin-bottom: 20px;
}

.retry-btn {
  margin-top: 20px;
  padding: 10px 20px;
  background: #ff6699;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  transition: background 0.3s ease;
}

.retry-btn:hover {
  background: #ff4757;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .user-page {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    position: relative;
  }

  .sidebar-header {
    padding: 20px;
  }

  .user-avatar {
    width: 60px;
    height: 60px;
  }

  .username {
    font-size: 18px;
  }

  .sidebar-nav li {
    padding: 12px 20px;
    font-size: 14px;
  }

  .main-content {
    padding: 20px;
  }

  .card-header {
    padding: 20px;
    flex-direction: column;
    gap: 15px;
    align-items: stretch;
  }

  .card-body {
    padding: 20px;
  }

  .info-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .current-level {
    flex-direction: column;
    align-items: stretch;
    gap: 15px;
  }

  .level-badge {
    text-align: center;
  }

  .modal-content,
  .report-modal-content {
    width: 95%;
    margin: 20px;
  }

  .modal-footer,
  .report-modal-footer {
    flex-direction: column;
  }

  .table-container {
    font-size: 12px;
  }

  .data-table th,
  .data-table td {
    padding: 10px 8px;
  }

  /* 举报弹窗响应式 */
  .report-modal-header {
    padding: 15px 20px;
  }

  .report-modal-body {
    padding: 20px;
  }

  .tips-tags {
    gap: 6px;
  }

  .tip-tag {
    font-size: 11px;
    padding: 3px 8px;
  }

  .report-cancel-btn,
  .report-submit-btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .card-header h2 {
    font-size: 20px;
  }

  .info-item {
    padding: 15px;
  }

  .form-input,
  .report-reason-input {
    font-size: 16px; /* 防止iOS缩放 */
  }

  .btn {
    padding: 10px 20px;
    font-size: 14px;
  }

  .tips-tags {
    gap: 4px;
  }

  .tip-tag {
    font-size: 10px;
    padding: 2px 6px;
  }
}
